﻿using Prism.Commands;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using corpus_platform.Data;

namespace corpus_platform.ViewModels
{
    public class ListedOntology : BindableBase
    {
        public ListedOntology(Ontology ontology, RootViewModel root)
        {
            Name = ontology.Name;
            Information = ontology.Information;
            Root = root;
        }
        public RootViewModel Root { get; }
        public string Name { get; }
        public string Information { get; }

        private DelegateCommand commandToBinding;
        public DelegateCommand CommandToBinding =>
            commandToBinding ?? (commandToBinding = new DelegateCommand(ExecuteCommandToBinding, CanExecuteCommandToBinding));

        void ExecuteCommandToBinding()
        {
            new OntologyViewModel(this);
        }

        bool CanExecuteCommandToBinding()
        {
            return true;
        }
    }
}
